﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Finance/FinanceMaster.master" AutoEventWireup="true" 
	CodeBehind="CommTemplateLetterEditor.aspx.cs" Inherits="WebApplication.Finance.CommTemplateLetterEditor" Theme="BaselineTheme" %>

<%@ Register src="../Controls/PageHeadingBarCtrl.ascx" tagname="PageHeadingBarCtrl" tagprefix="uc1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.fieldsPanel
{
	margin:auto;
	width:500px;
	border-bottom-style:solid; 
	border-bottom-width:4px; 
	border-bottom-color:Red;
	margin-top:32px;
}
</style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<!-- Heading bar -->
<div style="margin:auto; margin-top:0px; width:810px;">
	<uc1:PageHeadingBarCtrl ID="pageHeadingBarCtrl" runat="server" Title="Letter Template Editor" />
</div>

<!-- Editing controls -->
<asp:Panel ID="pnlFields" runat="server" CssClass="fieldsPanel">
<asp:UpdatePanel ID="updFields" runat="server">
<ContentTemplate>
<table align="center" class="DataTable" border="0" cellspacing="4" cellpadding="4" style="width:400px; text-align:left; padding-top:8px; padding-bottom:8px;">
	<tr>
		<td class="DataTableLabel" width="48px">Name:</td>
		<td><asp:TextBox ID="txtName" MaxLength="50" runat="server" Width="300px" />
			<asp:RequiredFieldValidator ControlToValidate="txtName" ID="valName" runat="server" ErrorMessage="<br>Name required" Display="Dynamic"></asp:RequiredFieldValidator>
		</td>
	</tr>
	<asp:Panel runat="server" ID="pnlOverwriteOption">
	<tr>
		<td></td>
		<td class="DataTableValue"><asp:CheckBox ID="chkOverwrite" runat="server" Text="Overwrite existing file?" Checked="true" AutoPostBack="true" /></td>
	</tr>
	</asp:Panel>
	<asp:Panel runat="server" ID="pnlFileUpload">
	<tr>
		<td class="DataTableLabel">File:</td>
		<td><asp:FileUpload Width="360px" Height="24px" ID="fileUpload" runat="server" /></td>
	</tr>
	</asp:Panel>
	<tr>
		<td width="48px"></td>
		<td style="text-align:right;">
			<asp:Button ID="butTest" runat="server" Text="Test..." OnClick="butTest_Click" />&nbsp;
			<asp:Button ID="butSave" runat="server" Text="Save" OnClick="butSave_Click" />&nbsp;
			<asp:Button ID="butRevert" runat="server" Text="Revert" OnClick="butRevert_Click" CausesValidation="false" />
		</td>
	</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="butSave" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>

<!-- Links -->
<div style="margin:auto; margin-top:10px; width:500px; text-align:right">
	<asp:HyperLink ID="HypButton1" runat="server" CssClass="BaselineLinkStyle" Text="Templates..." NavigateUrl="~/Finance/CommTemplates.aspx" />
</div>

</asp:Content>
